package spring.boot.mybatis.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import spring.boot.mybatis.mapper.TUserMapper;
import spring.boot.mybatis.model.TUser;

import java.util.List;

@Service
@Transactional
public class TUserService {

    @Autowired(required = false)
    private TUserMapper tUserMapper;

    public Integer insert(TUser tUser) {
        return tUserMapper.insert(tUser);
    }

    public Integer updateSome(TUser tUser) {
        return tUserMapper.updateSome(tUser);
    }

    public Integer update(TUser tUser) {
        return tUserMapper.update(tUser);
    }

    public List<TUser> select() {
        return tUserMapper.select();
    }

    public List<TUser> selectPage() {
        return tUserMapper.selectPage();
    }

    public Integer delete(Long id) {
        return tUserMapper.delete(id);
    }
}
